﻿using System.Linq;
using FacialClub.Models.Entities;

namespace FacialClub.Models.Interfaces
{
    /// <summary>
    /// Newsletter Repository Interface
    /// </summary>
    public interface INewsletterRepository
    {
        /// <summary>
        /// Get All Newsletter
        /// </summary>
        /// <returns></returns>
        IQueryable<Newsletter> FindAllNewsletter();

        /// <summary>
        /// Get Newsletter By Name
        /// </summary>
        /// <param name="strQuery"></param>
        /// <returns></returns>
        IQueryable<Newsletter> FindNewsletterByName(string strQuery);

        /// <summary>
        /// Get Newsletter By Email
        /// </summary>
        /// <param name="strQuery"></param>
        /// <returns></returns>
        IQueryable<Newsletter> FindNewsletterByEmail(string strQuery);

        /// <summary>
        /// Get Newsletter By Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Newsletter GetNewsletterById(int id);

        /// <summary>
        /// Add Newsletter in the Database
        /// </summary>
        /// <param name="newsletter"></param>
        void Add(Newsletter newsletter);

        /// <summary>
        /// Delete Newsletter from the Database
        /// </summary>
        /// <param name="newsletter"></param>
        void Delete(Newsletter newsletter);

        /// <summary>
        /// Save record in the database
        /// </summary>
        void Save();
    }
}